/**
 * 快捷访问
 */

const getters = {
    token: state => state.user.token,
    /**
     *return true 表示用户信息已经存在
     */
    hasUserInfo: state => {
        return JSON.stringify(state.user.userInfo) !== "{}"
    },
    userInfo: state => state.user.userInfo,
    sidebarOpened: state => state.app.sidebarOpened
}

export default getters